package com.java502.shirodemo502.controller;

import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author:Teacher黄
 * @date:Created at 2019/12/30
 */
@Controller
public class MemberController {


    @GetMapping("/member/index")
    @RequiresRoles("会员管理员")
    public String index(){
        return "member/index";
    }

    @GetMapping("/member/center")
    @RequiresPermissions(value = {"/member/list","/member/xxx"},logical = Logical.OR)
    public String center(){
        return "member/index";
    }

    @GetMapping("/member/testRole")
    public String testRole(){
        return "member/index";
    }

    @GetMapping("/member/testPer")
    public String testPer(){
        return "member/index";
    }


}
